package com.zfast.forge.game.menus;


import com.zfast.config.constant.LanguageType_CN;
import com.zfast.config.game.common.QueueProvider;
import com.zfast.config.game.menus.MenuItem;
import com.zfast.config.game.menus.Menus;

/**
 * 模板菜单
 */
public class 模板Menu extends Menus {
    public void start(){
        //region 初始化选项
        menuItems.add(new MenuItem(LanguageType_CN.sysStart, LanguageType_CN.sysStart001));
        //endregion

        //region 循环交互
        boolean continuing;
        do {
            MenuItem selectedItem = displayMenu(menuItems);
            continuing = testOption(selectedItem);
        } while (continuing);
        //endregion
    }

    public boolean testOption(MenuItem m){
        String key = m.getKey();
        if(key.equals(LanguageType_CN.sysExit)){
            QueueProvider.offer(LanguageType_CN.sysExit);
            return false;
        }
        return true;
    }

}
